<?php
$page_title="Manage Member Seva Commitments - List";
	include("includes/header.php");
?>
<?
$query="select C.*,P.full_name,P.email_id from bkitc_member_commitment C JOIN bkitc_profiles P ON C.member_id=P.registrant_id where C.rec_status>=1 ";
$commitmentInfo = qry_data($query." order by created_date  desc");

?>
	<div class="fleft">
		
		</div>		
		<div class="cleardiv">
		
		</div>
<table width="100%" >
	<tr>
	<td valign="top">
		
	<table   class="table_panel" width="100%"  cellspacing="0" cellpadding="4">
	<tr  align="left">
	<th width="5">S.No</th>
	<th>Member Code</th>
	<th  style="width:120px">Name</th>
	<th>Email</th>
	<th >Committed On</th>
	<th>Text</th>
	<th >Display in Front</th>
	<th >Edit/Delete</th>
	</tr>
	<? foreach($commitmentInfo as $i=>$commit) {?>

	<tr <?if($i%2==0) echo 'class="white_bg"'; else echo 'class="grey_bg"' ?>>
	<td><?=$i+1;?></td>
	<td ><a href="edit_member.php?mode=edit&mid=<?=$commit["member_id"]?>"><?=formatMemberCode($commit["member_id"]);?></a></td>
	<td ><?=$commit["full_name"];?></td>
	<td ><?=$commit["email_id"];?></td>
	<td ><?=$commit["created_date"];?></td>
	<td ><div style="width:200px;max-height:100px;overflow:auto;padding:3px;"><?=$commit["message"];?></a></div></td>
	<td ><?=($commit["display_front"]==0?"No":"Yes");?></a></td>
	
	<td>
		<a href="edit_commitment.php?mode=edit&commit_id=<?=$commit["commit_id"];?>">Edit</a> | 
		<a  href="javascript:if(confirm('Are you sure to delete this Commitment?')) location.href='edit_commitment.php?mode=del&commit_id=<?=$commit["commit_id"];?>'";>Delete</a> 
	</td>
	</tr>
	
	<? } ?>
	</table>
	
	</td>
	</tr>
	
	</table>

<?php include("includes/footer.php"); ?>

